package com.neusoft.resturant.controller;


import com.neusoft.resturant.entity.Student;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api")
public class FirstController {

    @Value("${com.mysql.user}")
    private String user;

    @Value("${com.mysql.password}")
    private String password;

    @GetMapping("/yml")
    public String testYml(){
        return this.user + this.password;
    }

@GetMapping("show")
    public Student show(){
        Student student = new Student();
        student.setSno("21001010827");
        student.setName("邵静茹");
        student.setSex("女");
        return student;
    }

    @GetMapping("show1")
    public Student show1(){
        Student student = new Student();
        student.setSno("111");
        student.setName("邵");
        student.setSex("女");
        return student;
    }
}
